package com.wedo.search.pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Document(indexName = "searchbook",type = "docs", shards = 1,replicas = 0)
public class SearchBook {
    @Id
    @Field(store = true,index = false,type = FieldType.Long)
    private Long id;    // 图书id
    @Field(store = true,type = FieldType.Text, analyzer = "ik_max_word")
    private String all;   // 所有需要被搜索的信息,包含书名、作者的拼接
    private String title;   // 标题
    private String authorName;  // 作者名
    private String image;   // 图片地址

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAll() {
        return all;
    }

    public void setAll(String all) {
        this.all = all;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }
}
